//
//  PayMoneyWithOutTableViewCell.m
//  shanHaiHuiApp
//
//  Created by 小和尚 on 2018/3/21.
//  Copyright © 2018年 徐双. All rights reserved.
//

#import "PayMoneyWithOutTableViewCell.h"
@interface PayMoneyWithOutTableViewCell()

Strong UILabel * payLabel;

Strong UIView * lineView1;

Strong UILabel *memberLabel;

Strong UIView * lineView2;

@end

@implementation PayMoneyWithOutTableViewCell

- (instancetype)initWithCellIdentifier:(NSString *)cellID{
    
    if(self = [super initWithCellIdentifier:cellID]){
        
        self.selectionStyle = UITableViewCellEditingStyleNone;
        
        _payLabel = [[UILabel alloc] init];
        _payLabel.text = @"需支付金额";
        _payLabel.font = DEF_FontSize_14;
        _payLabel.textColor = getColor(textColor);
        
        _payMoneyLabel = [[UILabel alloc] init];
        _payMoneyLabel.text = @"200.00元";
        _payMoneyLabel.textColor = getColor(@"EC4350");
        _payMoneyLabel.font = DEF_FontSize_14;
        
        _lineView1 = [[UIView alloc] init];
        _lineView1.backgroundColor = getColor(dividerColor);
        
        _memberLabel = [[UILabel alloc] init];
        _memberLabel.text = @"会员卡支付";
        _memberLabel.font = DEF_FontSize_14;
        _memberLabel.textColor = getColor(textColor);
        
        _memberMoneyLabel = [[UILabel alloc] init];
        _memberMoneyLabel.text = @"100.00元";
        _memberMoneyLabel.font = DEF_FontSize_14;
        _memberMoneyLabel.textColor = getColor(textColor);
        
        _lineView2 = [[UIView alloc] init];
        _lineView2.backgroundColor = getColor(dividerColor);
        
        [self sd_addSubviews:@[self.payLabel,self.payMoneyLabel,self.lineView1,self.memberLabel,self.memberMoneyLabel,self.lineView2]];
        
        [self layOutFrame];
    }
    return self;
}

- (void)layOutFrame{
    
    ws(self)
    
    [self.payLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(UNIT_HEIGHT(16));
        make.left.mas_equalTo(UNIT_WIDTH(14));
        make.height.mas_equalTo(UNIT_HEIGHT(30));
    }];
    
    [self.payMoneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(UNIT_HEIGHT(16));
        make.right.mas_equalTo(UNIT_WIDTH(-15));
        make.height.mas_equalTo(UNIT_HEIGHT(30));
    }];
    
    [self.lineView1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(weakself.payLabel.mas_bottom).offset(UNIT_HEIGHT(10));
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(0);
        make.height.mas_equalTo(0.5);
    }];
    
    [self.memberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(UNIT_WIDTH(14));
        make.top.mas_equalTo(weakself.lineView1.mas_bottom).offset(UNIT_HEIGHT(10));
        make.height.mas_equalTo(UNIT_HEIGHT(30));
    }];
    
    [self.memberMoneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(UNIT_WIDTH(-15));
        make.top.mas_equalTo(weakself.lineView1.mas_bottom).offset(UNIT_HEIGHT(10));
        make.height.mas_equalTo(UNIT_HEIGHT(30));
    }];
    
    [self.lineView2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(weakself.memberMoneyLabel.mas_bottom).offset(UNIT_HEIGHT(10));
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(0);
        make.height.mas_equalTo(5);
    }];
    
    
}


@end
